package service.album;

import dao.AlbumDAO;
import dao.RecordDuplicateException;
import entities.Customer;
import entities.Album;


public class AlbumServiceInMemory implements AlbumService {

	public AlbumServiceInMemory(){
		
	}
	
	public static AlbumService newInstance(){
		return new AlbumServiceInMemory();
	}
	
	/**
	 * Finds a Album based on the Album id.
	 * @param userid - user id
	 * @return the instance of the Album
	 */
	public Album findAlbum(Long product_id){
		AlbumDAO db = AlbumDAO.getInstance();
		Album result = null;
		result = db.findAlbum(product_id);
		return result;
	}
	
	
	/**
	 * Adds a new Album to the system.
	 * @param obj - the Album instance to add
	 */
	
	public void addAlbum(Album obj) throws RecordDuplicateException{
		AlbumDAO db = AlbumDAO.getInstance();	
		db.addAlbum(obj);
		return;
	}








}
